home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
v cisle
/
pcwkillall
/
pcwKillEmAll.exe
/
Tools
/
pcwKillMovieMaker.vbs
< prev
next >
Wrap
Text File
|
2006-09-18
|
7KB
|
155 lines
Set MyShell = CreateObject("Wscript.Shell")
Set MyFiles = CreateObject("Scripting.FileSystemObject")
Set umgebung=MyShell.Environment("PROCESS")
On Error Resume Next
windir=umgebung("windir")
userprofile=umgebung("userprofile")
NT = MyShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName")
Programs = MyShell.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir")
dllcache = MyShell.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SFCDllCacheDir")
if not NT = "" Then
ret = MsgBox("Pro ·plnΘ odstran∞nφ Movie Makeru musφte mφt p°φstup ke Konzole pro zotavenφ. " &_
"P°ipravte si instalaΦnφ CD Windows a v Φlßnku si p°eΦt∞te, jak postupovat a jak si Konzolu pro zotavenφ pozd∞ji spustit. " & vbcr &_
"Mß se nynφ pokraΦovat?", vbYesNo+vbInformation, "Odstran∞nφ Movie Makeru")
If Ret = vbNo Then wscript.quit
Else
ret = MsgBox("Mß se nynφ Movie Maker odstranit?", vbYesNo+vbInformation, "Odstranit Movie Maker")
If Ret = vbNo Then wscript.quit
End if
loesch = Myfiles.Deletefolder(Programs & "\Movie Maker\MUI", True)
loesch = Myfiles.Deletefolder(Programs & "\Movie Maker\TOUR", True)
If dllcache = "" Then
dllcache = windir & "\System32\dllcache"
End If
If Right(dllcache, 1) = "\" Then dllcache = Mid(dllcache, 1, Len(dllcache)-1)
Set Killer = MyFiles.OpenTextFile(windir & "\pcwKmm.BAT", 2, True)
If not NT="" Then
Killer.Writeline "Set AllowAllPaths = True"
End If
If (myfiles.FileExists(dllcache & "\MOVIEMK.EXE")) Then
Killer.Writeline "del " & chr(34) & dllcache & "\MOVIEMK.EXE" & chr(34)
End If
if (myfiles.FileExists(dllcache & "\WMMFILT.DLL")) Then
Killer.Writeline "del " & chr(34) & dllcache & "\WMMFILT.DLL" & chr(34)
End If
if (myfiles.FileExists(dllcache & "\WMMRES.DLL")) Then
Killer.Writeline "del " & chr(34) & dllcache & "\WMMRES.DLL" & chr(34)
End If
if (myfiles.FileExists(dllcache & "\WMMUTIL.DLL")) Then
Killer.Writeline "del " & chr(34) & dllcache & "\WMMUTIL.DLL" & chr(34)
End If
If (myfiles.FileExists(windir & "\SERVICEPACKFILES\I386\MOVIEMK.EXE")) Then
Killer.Writeline "del " & chr(34) & windir & "\SERVICEPACKFILES\I386\MOVIEMK.EXE" & chr(34)
End If
if (myfiles.FileExists(windir & "\SERVICEPACKFILES\I386\WMMFILT.DLL")) Then
Killer.Writeline "del " & chr(34) & windir & "\SERVICEPACKFILES\I386\WMMFILT.DLL" & chr(34)
End If
if (myfiles.FileExists(windir & "\SERVICEPACKFILES\I386\WMMRES.DLL")) Then
Killer.Writeline "del " & chr(34) & windir & "\SERVICEPACKFILES\I386\WMMRES.DLL" & chr(34)
End If
if (myfiles.FileExists(windir & "\SERVICEPACKFILES\I386\WMMUTIL.DLL")) Then
Killer.Writeline "del " & chr(34) & windir & "\SERVICEPACKFILES\I386\WMMUTIL.DLL" & chr(34)
End If
If (myfiles.FileExists(userprofile & "\Nabφdka Start\Programy\P°φsluÜenstvφ\Windows Movie Maker.LNK")) Then
loesch = Myfiles.Deletefile(userprofile & "\Nabφdka Start\Programy\P°φsluÜenstvφ\Windows Movie Maker.LNK", True)
End If
If (myfiles.FileExists(windir & "\Nabφdka Start\Programy\P°φsluÜenstvφ\Windows Movie Maker.LNK")) Then
loesch = Myfiles.Deletefile(windir & "\Nabφdka Start\Programy\P°φsluÜenstvφ\Windows Movie Maker.LNK", True)
End If
hardfolder = Programs & "\Movie Maker"
Set festverz = myfiles.GetFolder(hardfolder)
Set Subfolder = festverz.Subfolders
For Each folder in Subfolder
Set Currentfolder = Myfiles.GetFolder(festverz & "\" & folder.name)
Set ffiles = Currentfolder.Files
ords = Currentfolder.ShortPath
For Each file in ffiles
If NT = "" Then
Killer.Writeline "del " & chr(34) & ords & "\" & file.Shortname & Chr(34)
Else
Killer.Writeline "del " & chr(34) & Currentfolder & "\" & file.name & Chr(34)
End If
Next
If (myfiles.FolderExists(programs & "/Movie Maker")) Then
If NT="" Then
Killer.Writeline "rd " & chr(34) & ords & chr(34)
Else
Killer.Writeline "rd " & chr(34) & Currentfolder & mm & chr(34)
End If
End If
Next
Set ffiles = festverz.Files
For Each file in ffiles
If NT = "" Then
ords = festverz.ShortPath
Killer.Writeline "del " & chr(34) & ords & "\" & file.Shortname & Chr(34)
Else
Killer.Writeline "del " & chr(34) & festverz & "\" & file.name & Chr(34)
End if
Next
If (myfiles.FolderExists(programs & "\Movie Maker")) Then
If NT="" Then
Killer.Writeline "rd " & chr(34) & ords & chr(34)
Else
Killer.Writeline "rd " & chr(34) & programs & "\Movie Maker" & chr(34)
End If
End If
Killer.close
Set Killer = MyFiles.OpenTextFile(windir & "\pcwKmm.BAT", 1, False)
Do While Not Killer.AtEndOfStream
Zeile = Killer.ReadLine
Nummer = Killer.Line-1
Loop
Killer.close
Set RegKill = MyFiles.OpenTextFile(windir & "\pcwRk.REG", 2, True)
RegKill.Writeline "REGEDIT4"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_CLASSES_ROOT\.MSWMM]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_CLASSES_ROOT\Windows.Movie.Maker]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.MSWMM]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Windows.Movie.Maker]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OptionalComponents\Moviemk]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\moviemk.exe]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\moviemk.exe]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\DeviceClasses\{CC7BFB41-F175-11D1-A392-00E0291F3959}]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\DeviceHandlers\VideoCameraDeviceHandler]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\VideoCameraArrival]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\MSVideoCameraArrival]"
RegKill.Writeline ""
RegKill.Writeline "[-HKEY_CURRENT_USER\Software\Microsoft\MovieMaker]"
RegKill.Writeline ""
RegKill.Close
Einlesen=MyShell.Run("regedit.exe /s " & windir & "\pcwRk.REG", 0, True)
loesch = Myfiles.Deletefile(windir & "\pcwRk.REG", True)
If NT = "" Then
Wo = "im DOS-Modus"
loesch = Myfiles.Deletefolder(windir & "\Anwendungsdaten\Microsoft\Movie Maker", True)
Else
loesch = Myfiles.Deletefolder(userprofile & "\Data aplikacφ\Microsoft\Movie Maker", True)
MyShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SetCommand", 1, "REG_DWORD"
Wo = "v Konzole pro zotavenφ"
End If
Ende = MsgBox("Restartujte poΦφtaΦ " & Wo & " a spus¥te dßvkov² soubor " & windir & "\pcwKmm.BAT , kter² odstranφ zbylΘ " & Nummer & " soubory Movie Makeru.", 64, "Skript PC WORLDu pro odstran∞nφ Movie Makeru: Hotovo")